<?php

require_once('../../../../includes.php');

require_once('../../view/page.php');
require_once('../../view/tags.php');
require_once('../../view/comment.php');

require_once('../../model/user.php');

// Grab homepage of current user.
if( !isloggedin() )
    trigger_error('You must be logged in');
    
$user = folio_user::SelectWhereIdent( $_SESSION['userid']);
$page = folio_page::SelectHomepage($user);

global $metatags;

$form = new folio_PageBodyView( $page );
        $form->Load( new folio_PageAttachmentView( $page ));
        $form->Load( new folio_TagViewer($page));
        $form->Load( new folio_PageChildrenList( $page ));
        $form->Load( new folio_CommentViewer( $page ));
        $form->Load( new folio_CommentBox( $page ));

$html =     $form->toString();

echo '<html><head>' . $metatags . '</head>' .
    '<body>' . $html . '</body></html>';



?>
